package com.yanqu.road.logic.bussiness.grandchild;

import com.yanqu.road.entity.grandchild.GrandChildChampion;
import com.yanqu.road.entity.grandchild.GrandChildExamData;
import com.yanqu.road.entity.grandchild.GrandChildOfficial;
import com.yanqu.road.entity.grandchild.GrandChildProfession;
import com.yanqu.road.entity.grandchild.GrandChildUserExam;
import com.yanqu.road.entity.grandchild.JoinExamGrandChild;
import com.yanqu.road.entity.grandchild.ServerExamData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class GrandChildBussiness {

    // 待处理科举数据

    public static Map<Long, GrandChildUserExam> getGrandChildUserExamMap() {
        return DaoHelper.getGrandChildUserExamDaoImpl().getGrandChildUserExamMap();
    }

    public static boolean updateGrandChildUserExam(GrandChildUserExam data) {
        return DaoHelper.getGrandChildUserExamDaoImpl().update(data);
    }

    public static boolean addGrandChildUserExam(GrandChildUserExam data) {
        return DaoHelper.getGrandChildUserExamDaoImpl().add(data);
    }

    // 科举基础数据

    public static Map<Long, GrandChildExamData> getGrandChildExamDataMap(long minGlobalId) {
        return DaoHelper.getGrandChildExamDataDaoImpl().getGrandChildExamDataMap(minGlobalId);
    }

    public static boolean addGrandChildExamData(GrandChildExamData data) {
        return DaoHelper.getGrandChildExamDataDaoImpl().add(data);
    }

    public static boolean updateGrandChildExamData(GrandChildExamData data) {
        return DaoHelper.getGrandChildExamDataDaoImpl().update(data);
    }

    // 科举参与孙子数据

    public static Map<Long, List<JoinExamGrandChild>> getJoinExamGrandChildMap(long minGlobalId) {
        return DaoHelper.getGrandChildExamJoinDaoImpl().getJoinExamGrandChildMap(minGlobalId);
    }

    public static boolean addJoinExamGrandChild(JoinExamGrandChild data) {
        return DaoHelper.getGrandChildExamJoinDaoImpl().add(data);
    }

    public static boolean updateJoinExamGrandChild(JoinExamGrandChild data) {
        return DaoHelper.getGrandChildExamJoinDaoImpl().update(data);
    }

    // 区服科举数据

    public static Map<Long, ServerExamData> getServerExamDataMap() {
        return DaoHelper.getGrandChildServerExamDaoImpl().getServerExamDataMap();
    }

    public static boolean addServerExamData(ServerExamData data) {
        return DaoHelper.getGrandChildServerExamDaoImpl().add(data);
    }

    public static boolean updateServerExamData(ServerExamData data) {
        return DaoHelper.getGrandChildServerExamDaoImpl().update(data);
    }

    // 分组配置

    public static Map<Integer, List<Long>> getGrandChildGroupConfigMap(int channelId) {
        return DaoHelper.getGrandChildGroupConfigDaoImpl().getGrandChildGroupConfigMap(channelId);
    }

    // 科举状元数据

    public static Map<Long, Map<Long, GrandChildChampion>> getGrandChildChampionMap() {
        return DaoHelper.getGrandChildChanpionDaoImpl().getGrandChildChampionMap();
    }

    public static boolean addGrandChildChampion(GrandChildChampion data) {
        return DaoHelper.getGrandChildChanpionDaoImpl().add(data);
    }

    public static boolean updateGrandChildChampion(GrandChildChampion data) {
        return DaoHelper.getGrandChildChanpionDaoImpl().update(data);
    }

    // 不知道是啥自己命个名吧

    public static Map<Integer, GrandChildProfession> getGrandChildProfessionMap(long userId) {
        return DaoHelper.getGrandChildProfessionDaoImpl().getGrandChildProfessionMap(userId);
    }
    public static boolean updateGrandChildProfession(GrandChildProfession data) {
        return DaoHelper.getGrandChildProfessionDaoImpl().update(data);
    }
    public static boolean addGrandChildProfession(GrandChildProfession data) {
        return DaoHelper.getGrandChildProfessionDaoImpl().add(data);
    }

    public static Map<Integer, GrandChildOfficial> getGrandChildOfficialMap(long userId) {
        return DaoHelper.getGrandChildOfficialDaoImpl().getGrandChildOfficialMap(userId);
    }
    public static boolean updateGrandChildOfficial(GrandChildOfficial data) {
        return DaoHelper.getGrandChildOfficialDaoImpl().update(data);
    }
    public static boolean addGrandChildOfficial(GrandChildOfficial data) {
        return DaoHelper.getGrandChildOfficialDaoImpl().add(data);
    }
}
